Field of the Invention
The present invention relates to a communication apparatus, a method of controlling the same, and a storage medium.
Description of the Related Art
In an apparatus, such as a printer, a multifunction machine, or a PC (personal computer), which is provided with a LAN network interface, the settings of the communication mode of a PHY device, which is a physical layer of the LAN network interface, include a setting of a maximum communication speed and a setting of a communication method.
The maximum communication speed is represented by a maximum bit rate per unit time, such as 100 Mbps or 10 Mbps, at which physical transmission of data can be performed. The communication method includes a full-duplex communication method in which two-way simultaneous communication is possible and a half-duplex communication method in which only one of two apparatuses connected to each other can perform transmission.
Further, generally, the settings of the communication mode of the PHY device include a setting of an auto-negotiation mode and a setting of a fixed mode. The auto-negotiation mode is a method in which PHY setting information called FLP (fast link pulse) is exchanged between two apparatuses when establishing a connection therebetween, whereby a common and fastest mode is automatically set by being selected from communication speeds and communication methods that can be set between the two apparatuses.
In this case, a highest maximum bit rate is adopted as the maximum communication speed, and the full-duplex communication method is preferentially adopted as the communication method.
By connecting two apparatuses operable in the auto-negotiation mode to each other by a LAN cable, it is possible to automatically select a maximum communication speed and a communication method which can be set between the two apparatuses and ensures a fastest communication, without the user being conscious thereof.
On the other hand, in the fixed mode, parameters of the maximum communication speed and the communication method are fixedly set irrespective of the settings of an other-party apparatus at the other end of communication.
As for connection between an apparatus that operates in the auto-negotiation mode and an apparatus that operates in the fixed mode, it is determined by the standard of IEEE 802.3 that the half-duplex communication method is to be employed for the connection.
For this reason, in the case of establishing a connection between an apparatus that operates in the fixed mode with the communication method set to the full-duplex communication method and an apparatus that operates in the auto-negotiation mode, the communication method of the apparatus that operates in the fixed mode is set to the full-duplex communication method and the communication method of the apparatus that operates in the auto-negotiation mode is set to the half-duplex communication method.
As a result, packet collision occurs due to the connection established using both the full-duplex communication method and the half-duplex communication method, which frequently causes packet retransmission, resulting in degradation of packet transmission efficiency.
To solve the above-described problem, there has been proposed a method in which, when delay in response to a particular packet is detected, if an apparatus that operates in the auto-negotiation mode is connected using the half-duplex communication method, the communication setting of the apparatus is changed to the fixed mode with the communication method set to the full-duplex communication method or the half-duplex communication method (see e.g. Japanese Patent No. 3945288).
However, in the method proposed in Japanese Patent No. 3945288, when an apparatus is set to the fixed mode, the apparatus cannot shift to an EEE (Energy Efficient Ethernet (registered trademark)) power saving mode defined by IEEE 802.3az.
In EEE, shifting of a LAN interface to the power saving mode is allowed only when apparatuses connected to each other employ the auto-negotiation mode, and the method proposed in Japanese Patent No. 3945288 in which the communication mode is changed to the fixed mode does not allow the LAN interface of the apparatuses to shift to the power saving mode.
This is because the two apparatuses notify each other of whether or not the self apparatus is set to the EEE power saving mode through negotiation during link establishment between them in the auto-negotiation mode. Therefore, when both of the two apparatuses are not operating in the auto-negotiation mode, it is impossible to shift to the EEE power saving mode.